package com.interview.thread.task;

import com.interview.thread.SleepHelper;

public class T00_F1 {

    public static void main(String[] args) {
        Worker worker1 = new Worker("1",4,true);
        Worker worker2 = new Worker("1",3,true);
        Worker worker3 = new Worker("1",1,false);
        worker1.start();
        worker2.start();
        worker3.start();
    }




}

class Worker extends Thread{
    String name;
    Integer time;
    Boolean bFlag;
    Worker(String name,Integer time,Boolean bFlag){
        this.name = name;
        this.time = time;
        this.bFlag = bFlag;
    }

    @Override
    public void run() {
        SleepHelper.sleepSeconds(time);
        System.out.println("执行结束"+bFlag);
    }
}
